package com.fzu.ess.common.controller;

import com.fzu.ess.common.Model.FileInputModel;
import com.fzu.ess.common.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * @author ercha
 * @ClassName: UploadController
 * @Description: //一句话功能简述/表所属模块
 * @Date 2015/12/03 19:35
 * @History:// 历史修改记录
 * <author>  // 修改人1
 * <time>    // 修改时间
 * <desc>    // 描述修改内容
 **/
@Controller
public class UploadController {

    @Autowired
    private UploadService uploadService;

    @ResponseBody
    @RequestMapping(value = "/upload")
    public FileInputModel Upload(HttpServletRequest request, String inputName){
        return uploadService.upload(request, inputName);
    }
}
